package com.stu.handlers;

import com.stu.common.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExecptionHandlers {
    @ExceptionHandler(CommonExecption.class)
    public R ex1(CommonExecption e){
        System.out.println(e.getMessage());
        e.printStackTrace();
        return R.error(e.getMessage());
    }
}
